const fetch = require('node-fetch');
const URL_RANKING = 
"https://h5api.m.taobao.com/h5/mtop.fliggy.ssif.pattern.home/1.0?type=originaljson&api=mtop.fliggy.ssif.pattern.home&v=1.0&data=%7B%22bizType%22%3A%22homepage%22%2C%22name%22%3A%22fliggy_home_new%22%2C%22version%22%3A%221.0.0%22%2C%22platform%22%3A%22h5%22%2C%22args%22%3A%22%7B%5C%22source%5C%22%3A%5C%22h5%5C%22%2C%5C%22initGuessYouLike%5C%22%3A%5C%221%5C%22%2C%5C%22useNewTrackArgsFlag%5C%22%3Atrue%2C%5C%22isLocationPermission%5C%22%3Afalse%2C%5C%22params%5C%22%3A%7B%5C%22spmabc%5C%22%3A%5C%22181.27203027.1998936340%5C%22%2C%5C%22fromType%5C%22%3A%5C%22CombDxGuessLike%5C%22%7D%7D%22%2C%22isLocationPermission%22%3Afalse%2C%22h5Version%22%3A%222.0.2%22%7D&ttid=201300@travel_h5_3.1.0&appKey=12574478&t=1659331208111&sign=301ea1dffd222145a614cf0a94815dee"
const fetchRankingById = () => {
    return fetch(URL_RANKING)
        .then(res => 
            res.json()
        )
        .then(json => json)
}

module.exports = {
    fetchRankingById
}